import request from '@/utils/request'

// 创建生长模型字典
export function createModuleType (data) {
  return request({
    url: '/growth/module-type/create',
    method: 'post',
    data: data
  })
}

// 更新生长模型字典
export function updateModuleType (data) {
  return request({
    url: '/growth/module-type/update',
    method: 'put',
    data: data
  })
}

// 删除生长模型字典
export function deleteModuleType (id) {
  return request({
    url: '/growth/module-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得生长模型字典
export function getModuleType (id) {
  return request({
    url: '/growth/module-type/get?id=' + id,
    method: 'get'
  })
}

// 获得生长模型字典分页
export function getModuleTypePage (query) {
  return request({
    url: '/growth/module-type/page',
    method: 'get',
    params: query
  })
}

// 获取模型选择框列表
export function listAllSimple () {
  return request({
    url: '/growth/module-type/list-all-simple',
    method: 'get'
  })
}

// 导出生长模型字典 Excel
export function exportModuleTypeExcel (query) {
  return request({
    url: '/growth/module-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
export function listAllColumn () {
  return request({
    url: '/growth/module-type/list-all-column',
    method: 'get'
  })
}
export function getAllColumn (id) {
  return request({
    url: '/growth/module-type/get-all-column?id=' + id,
    method: 'get'
  })
}
